import {createRouter, createWebHistory} from 'vue-router'
import main from "../views/main";
import homework from "../views/homework";
import addHomeWork from "../views/addHomeWork";
import add_curriculum_series from "../views/add_curriculum_series";
import login from "../views/login";
import curriculum_series from "../views/curriculum_series";
import add_curriculum from "../views/add_curriculum";
import curriculum_series_info from "../views/curriculum_series_info";
import Discuss from "../views/Discuss";
import DiscussList from "../components/DiscussList";
import student from "../views/student";
import studentAddByExcel from "../components/studentAddByExcel";
import studentShow from "../components/studentShow";
import homeworkList from "../components/HomeworkList";
import HomeWorkStatus from "../components/HomeWorkStatus";
// import ChangeHomeWorksStuList from "../components/ChangeHomeWorksStuList";
import Curriculum from "@/views/Curriculum";
import CurriculumIntroduction from "@/components/CurriculumIntroduction";
// import ChangeCurrsStuList from "@/components/ChangeCurrsStuList";
import ChangeHWKS from "@/components/ChangeHWKS";
import ChangeCURS from "@/components/ChangeCURS";
import pre_view_homework from "@/views/pre_view_homework";


const routes = [
    {
        path: '/',
        name: 'Index',
        component: main
    },
    {
        path: '/HomeWork',
        name: 'HomeWork',
        component: homework,
        children: [
            {
                path: 'pre_view_homework',
                name: 'pre_view_homework',
                component: pre_view_homework
            },
            {
                path: '',
                name: 'HomeWorkList',
                component: homeworkList
            },
            {
                path: 'HomeWorkStatus',
                name: 'HomeWorkStatus',
                component: HomeWorkStatus
            },
            {
                path: 'addHomeWork',
                name: 'addHomeWork',
                component: addHomeWork
            }, {
                path: 'ChangeHomeWorksStuList',
                name: 'ChangeHomeWorksStuList',
                component: ChangeHWKS
            },
        ]
    },
    {
        path: '/Curriculum',
        name: 'Curriculum',
        component: Curriculum,
        children: [
            {
                path: '',
                name: 'curriculumSeries',
                component: curriculum_series
            },
            {
                path: 'addCurriculumSeries',
                name: 'addCurriculumSeries',
                component: add_curriculum_series
            },
            {
                path: 'addCurriculum',
                name: 'add_curriculum',
                component: add_curriculum
            },
            {
                path: 'curriculum_series_info',
                name: 'curriculum_series_info',
                component: curriculum_series_info
            },
            {
                path: 'CurriculumIntroduction',
                name: 'CurriculumIntroduction',
                component: CurriculumIntroduction
            },
            {
                path: 'ChangeCurrsStuList',
                name: 'ChangeCurrsStuList',
                component: ChangeCURS
            },

        ]
    },

    {
        path: '/login',
        name: 'login',
        component: login
    },

    {
        path: '/student',
        name: '/student',
        component: student,
        children: [
            {
                path: '',
                name: 'studentShow',
                component: studentShow,
            },
            {
                path: 'addByExcel',
                name: 'studentaddByExcel',
                component: studentAddByExcel,
            },
        ]
    },
    {
        path: '/Discuss',
        name: 'Discuss',
        component: Discuss,
        children: [
            {
                path: 'list',
                name: 'DiscussList',
                component: DiscussList,
            }
        ]
    }
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router
